<template>
  <div class="list_menu_contain">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane :label="t.label" :name="t.name" v-for="t in tabData">
        <table>
          <thead>
            <tr>
              <th>监控名称</th>
              <th>监控频率</th>
              <th>是否报警</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="x in t.tab">
              <td>{{ x.tabname }}</td>
              <td>
                <select name="" id="">
                  <option value="">1min</option>
                  <option value="">2min</option>
                </select>
              </td>
              <td>
                <select name="" id="">
                  <option value="">开启</option>
                  <option value="">关闭</option>
                </select>
              </td>
            </tr>
          </tbody>
        </table>
      </el-tab-pane>
    </el-tabs>
    <div class="list_btn">
      <div class="button">
        <img src="../assets/images/路径 5.png" alt="" />
        更新
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tabData: [
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
          ],
          label: "参数设置",
          name: "first"

        },
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
            {
              tabname: "农情信息",
            },
          ],
          label: "气象要素",
          name: "second"
        },
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
            {
              tabname: "农情信息",
            },
            {
              tabname: "农业病虫害",
            },
          ],
          label: "雷达",
          name: "third"
        },
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
            {
              tabname: "农情信息",
            },
            {
              tabname: "农业病虫害",
            },
            {
              tabname: "雷电信息",
            },
          ],
          label: "重要天气",
          name: "fourth"
        },
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
            {
              tabname: "农情信息",
            },
            {
              tabname: "农业病虫害",
            },
            {
              tabname: "雷电信息",
            },
            {
              tabname: "灾害性天气",
            },
          ],
          label: "雷电",
          name: "fifth"
        },
        {
          tab: [
            {
              tabname: "气象要素",
            },
            {
              tabname: "重要天气",
            },
            {
              tabname: "雷达信息",
            },
            {
              tabname: "农情信息",
            },
            {
              tabname: "农业病虫害",
            },
            {
              tabname: "雷电信息",
            },
            {
              tabname: "灾害性天气",
            },
            {
              tabname: "水务水情",
            },
          ],
          label: "雷电1",
          name: "sixth"
        },
      ],
      activeName: "first",
    };
  },
  mounted() { },

  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>
<style scoped>
.list_menu_contain {
  width: 100%;
  height: 100%;
}

::v-deep .list_menu_contain .el-tabs {
  width: 100%;
}

::v-deep .el-tabs--card>.el-tabs__header .el-tabs__nav {
  border: none;
}

::v-deep .el-tabs--card>.el-tabs__header {
  border: none;
  margin: 10px 0 20px;
}

::v-deep .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2),
::v-deep .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child {
  padding: 0;
}

::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item {
  width: 75px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  padding: 0;
  border: none;
  background-size: 100% 100%;
  font-size: 12px;
  font-weight: 900;
  background-image: url(../assets/images/组\ 5.png);
  color: #0c1f7b;
}

::v-deep.el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
  background-image: url(../assets/images/组\ 4.png);
  color: #fff;
}

::v-deep .el-tabs__nav-prev {
  left: 370px;
  line-height: 22px;
}

::v-deep .el-tabs__nav-next {
  line-height: 22px;
}

::v-deep .el-tabs__nav-wrap.is-scrollable {
  padding: 0 20px 0 0;
}

::v-deep .el-tabs__content {
  width: 100%;
  padding-right: 10px;
  box-sizing: border-box;
}

::v-deep .el-tab-pane table {
  width: 100%;
  border-spacing: none;
  border-collapse: collapse;
  font-size: 12px;
}

tbody tr td {
  height: 35px !important;
  text-align: center;
}

tbody tr:nth-child(even) {
  background-color: #e9edf2;
}

thead tr {
  height: 30px;
  background-color: #e9edf2;
  color: #0c1f7b;
  font-weight: 900;
  font-size: 13px;
}

tbody tr td select {
  width: 90px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid #0c1f7b;
  text-align: center;
  font-size: 12px;
  outline: none;
}
.list_menu_contain .list_btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  padding-right: 10px;
  box-sizing: border-box;
}
.list_menu_contain .list_btn .button {
  width: 80px;
  height: 30px;
  border: 1px solid #0c1f7b;
  color: #0c1f7b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  border-radius: 3px;
}
.list_menu_contain .list_btn .button img {
  width: 12px;
  height: 12px;
  margin-right: 10px;
}
</style>